package com.lagou.edu.mvcframework.pojo;

import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.regex.Pattern;

public class Handler {

    private Object conroller;

    private Method mehtod;

    private Pattern pattern;

    private Map<String,Integer> paramIndexMapping;

    //这是每个方法的有权限的用户
    private List<String>  userNames;

    public Handler(Object conroller, Method mehtod, Pattern pattern,List<String> userNames) {
        this.conroller = conroller;
        this.mehtod = mehtod;
        this.pattern = pattern;
        this.paramIndexMapping = new HashMap<>();
        this.userNames = userNames;
    }

    public List<String> getUserName() {
        return userNames;
    }

    public void setUserName(List<String> userName) {
        this.userNames = userName;
    }

    public Pattern getPattern() {
        return pattern;
    }

    public void setPattern(Pattern pattern) {
        this.pattern = pattern;
    }

    public Object getConroller() {
        return conroller;
    }

    public void setConroller(Object conroller) {
        this.conroller = conroller;
    }

    public Method getMehtod() {
        return mehtod;
    }

    public void setMehtod(Method mehtod) {
        this.mehtod = mehtod;
    }

    public Map<String, Integer> getParamIndexMapping() {
        return paramIndexMapping;
    }

    public void setParamIndexMapping(Map<String, Integer> paramIndexMapping) {
        this.paramIndexMapping = paramIndexMapping;
    }
}
